Skip to content

fix: handle single-button gesture follow-ups correctly (#1026) - #1536

Merged
JohanBendz merged 1 commit into
develop-0.4.1from
fix/0.4.1-single-button-1026
Oct 26, 2026
Merged

JohanBendz merged 1 commit into
develop-0.4.1from
fix/0.4.1-single-button-1026

Conversation

@JohanBendz

Copy link
Copy Markdown
Owner

Captured traffic in #1026 contains a Tuya gesture followed by a standard OnOff command. The old parser can misinterpret the follow-up as another gesture, including a false hold, and intercepts unrelated ZCL traffic.

Recognize only the verified endpoint-1/cluster-6 command 0xFD with its single valid action byte. Native and serialized Buffer captures now produce exactly one existing single/double/hold Flow event per gesture. Forward all other traffic to the original dispatcher with its receiver, metadata, result and errors preserved. Restore the hook safely on reinitialization/deletion and retain SDK cleanup.

Only smart_remote_1_button_2/device.js changes runtime behavior. Pairing, capabilities, settings, Flow IDs/action values and protected shared/light sources remain unchanged. No timer debounce or battery feature is introduced.

Align package, both lock roots, Compose, generated manifest, channel-neutral changelog and development checks at 0.4.1. Update the roadmap/backlog and add the active preflight and physical Test checklist. main, dev and frozen develop-0.4 are outside this PR.

Validation:

  • 180 repository tests: 177 pass, 0 fail, 3 existing TODO.
  • Nine new behavioral tests using the original captured packets; the old source fails eight and passes one, the corrected source passes all nine.
  • Homey 4.5.0 build and supported-device index check passed locally; generated app.json changes only version.
  • Upload tree ede8794b9a8152067e633cdb455f1e89115abcf8 exactly matches the locally tested tree.
  • GitHub CI must pass Compose reproducibility, all tests and publish-level validation before merge. Local publish validation could not complete after the CLI cache became unavailable.

Refs #1026. Keep the issue open for physical single/double/hold and existing-Flow acceptance in public Test, plus the separately scoped optional battery request. No physical success or Store publication is claimed.

Preserve normal ZCL dispatch and existing Flow contracts for #1026. Add captured-frame behavioral regression coverage and align the first development batch at 0.4.1.
@JohanBendz
JohanBendz merged commit 0be7fca into develop-0.4.1 Oct 26, 2026
1 check passed

Copy link
Copy Markdown
Owner Author

Merged at 0be7fca64c358a57b95a236796e68f5a37a6a500. Both PR CI and merged-head CI passed all steps, including Homey publish validation and generated-manifest reproducibility. Merge tree ede8794b9a8152067e633cdb455f1e89115abcf8 matches the locally tested upload exactly. Full suite: 180 tests, 177 pass, 0 fail, 3 existing TODO. #1026 remains open for hardware acceptance and the separately scoped optional battery request. main/dev/frozen develop-0.4 remain unchanged.

@JohanBendz
JohanBendz deleted the fix/0.4.1-single-button-1026 branch November 16, 2026 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant